CXXFLAGS += -g

all : thread_test1 mutex_test1 condition_test1 condition_test2 condition_test3 sem_test1 sem_test2 spin_test1

thread_test1 : thread_test1.cpp ../src/thread.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

mutex_test1 : mutex_test1.cpp ../src/thread.cpp ../src/mutex.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

condition_test1 : condition_test1.cpp ../src/thread.cpp ../src/mutex.cpp ../src/condvar.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

condition_test2 : condition_test2.cpp ../src/thread.cpp ../src/mutex.cpp ../src/condvar.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

condition_test3 : condition_test3.cpp ../src/thread.cpp ../src/mutex.cpp ../src/condvar.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

sem_test1 : sem_test1.cpp ../src/thread.cpp ../src/semaphore.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

sem_test2 : sem_test2.cpp ../src/thread.cpp ../src/semaphore.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

spin_test1 : spin_test1.cpp ../src/thread.cpp ../src/spinlock.cpp
	g++ $(CXXFALGS) -o $@ $^ -lpthread

